<include file="Public:header"/>
<link href="__PUBLIC__/Catalog/css/noticeList.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="{:U('Index/index')}" id="back"> < </a>公告信息
         </div>
   </div>
   <div class="noticelist">
       <ul  id="ncontent">
       		<foreach name="newslist" item="vo">
       			<li>
		             <dl>
		                <dd class="des"><a href="{:U('News/detail')}?newsid={$vo.news_id}"><if condition="$vo['top_flag'] eq 1">[置顶] </if>{$vo.news_title}</a></dd>
		                <dd style="padding-left: 10px;"><span id="dates">{$vo.news_added}</span><span id="clicks">{$vo.viewd}</span></dd>
		             </dl>
		          </li>
       		</foreach>
         
       </ul>
   </div>
</div>
<input type="hidden" id="nowpage" value="{$nowpage}" />
<if condition="$flag eq 1"><div class="foot"><a href="javascript:addMore();">加载更多内容>></a></div></if>
<script>
function addMore(){
	var nowpage = $('#nowpage').val();
	
	$.ajax({
		type:'GET',
		url:"{:U('News/getmore')}",
		datatype:'json',
		data:{nowpage:nowpage},
		success:function(data){
			datacontent =window.JSON.parse(data);
			//alert(datacontent.flag);
			if(datacontent.flag){
				alert('已经没有新公告了！')
			}else{
				var str=datacontent.ncontent;
				$('#ncontent').append(str);
				$('#nowpage').val(datacontent.page);
			
			}
		},
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			alert(XMLHttpRequest.status);
			alert(XMLHttpRequest.readyState);
			alert(textStatus);
		},

	})
}

</script>
<include file="Public:footer" />
